package ractor;

import reactor.core.publisher.Flux;

import java.util.stream.LongStream;

public class MonoDemo {

    public static void main(String[] args) {
        Flux<Long> empty = Flux.empty();
        LongStream.range(0, 100).boxed().forEach(lon -> {
            empty.mergeWith(Flux.merge(Flux.just(lon)));
        });
        empty.subscribe(System.out::println);
        System.out.println("=============--->>>>>>>>>>>>>>>===============");
        Flux<Integer> merge0 = Flux.merge(Flux.just(1));
        Flux<Integer> merge1 = Flux.merge(Flux.just(2));
        Flux<Long> empty1 = Flux.empty();
        empty1.merge(merge0,merge1).subscribe(System.out::println);


    }
}
